//package com.android.cl.coludtf.network;
//
//
//import com.android.cl.coludtf.appcliation.MyAppcliation;
//import com.android.cl.coludtf.model.BaseBO;
//import com.loopj.android.http.AsyncHttpClient;
//
//import java.io.UnsupportedEncodingException;
//
//import cz.msebera.android.httpclient.entity.ByteArrayEntity;
//import cz.msebera.android.httpclient.message.BasicHeader;
//import cz.msebera.android.httpclient.protocol.HTTP;
//
//public class RequestUtils {
//
//    public static AsyncHttpClient client = new AsyncHttpClient();
//
//    public static void ClientGet(String url, NetCallBack cb) {
//        client.get(url, cb);
//    }
//
//
////    public static void ClientPost(String url, Map<String, String> postParamsMap, NetCallBack cb) {
////        RequestParams params = new RequestParams();
////        if (postParamsMap != null && postParamsMap.size() > 0) {
////            for (Map.Entry<String, String> entry : postParamsMap.entrySet()) {
////                params.put(entry.getKey(), entry.getValue());
////            }
////        }
////        client.post(url, params, cb);
////    }
//
//    public static void ClientPost(String url, BaseBO bo, NetCallBack cb) {
//        if (bo.token != null && !bo.token.equals("")) {
//            client.addHeader("Authorization", bo.token);
//        }
//        ByteArrayEntity entity = null;
//        try {
//            entity = new ByteArrayEntity(bo.postBody.getBytes("UTF-8"));
//            entity.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
//        } catch (UnsupportedEncodingException e) {
//            e.printStackTrace();
//        }
//        client.post(MyAppcliation.context, url, entity, "application/json", cb);
//    }
//}
//
